﻿using System;
using System.Collections.Generic;
using System.Text;
using MyHotel_BUSWS.MyHotel_ChucVuDAO_Webservice;
using MyHotel_BUSWS.MyHotel_NhanVienDAO_Webservice;
using MyHotel_BUSWS.MyHotel_PhanQuyenDAO_Webservice;


namespace MyHotel_BUSWS
{
    public class MHQuanLyNhanVienBUS
    {
        public static ChucVu[] getListChucVu()
        {
            ChucVuDAOWSSoapClient ws = new ChucVuDAOWSSoapClient();
            return ws.getList();
        }
        //public static NhanVien[] getThongTinNhanVienByMaChucVu(int maChucVu)
        //{
        //    NhanVienDAOWSSoapClient ws = new NhanVienDAOWSSoapClient();
        //    return ws.layThongTinNhanVienbyMaChucVu(maChucVu);
        //}
        public static NhanVien[] getListNhanVien()
        {
            NhanVienDAOWSSoapClient ws = new NhanVienDAOWSSoapClient();
            return ws.getList();
        }
        //public static string getTenChucVuByMaChucVu(int maChucVu)
        //{
        //    QuanLyNhanVienDAOWSSoapClient ws = new QuanLyNhanVienDAOWSSoapClient();
        //    return ws.layTenChucVuByMa(maChucVu);
        //}
        public static int themNhanVien(NhanVien nv)
        {
            NhanVienDAOWSSoapClient ws = new NhanVienDAOWSSoapClient();
            return ws.themNhanvien(nv);
        }
        
        public static bool xoaNhanVien(NhanVien nv)
        {
            NhanVienDAOWSSoapClient ws = new NhanVienDAOWSSoapClient();
            return ws.xoaNhanVien(nv);
        }
        public static bool resetMatKhau(int manv)
        {
            NhanVienDAOWSSoapClient ws = new NhanVienDAOWSSoapClient();
            return ws.resetMatKhau(manv);
        }

        public static bool xoaPhanQuyen(PhanQuyen pq)
        {
            PhanQuyenDAOWSSoapClient ws = new PhanQuyenDAOWSSoapClient();
            return ws.xoaPhanQuyen(pq);
        }

        public static ChucVu[] getListChucVuByMaNV(int maNhanVien)
        {

            ChucVuDAOWSSoapClient ws = new ChucVuDAOWSSoapClient();
            return ws.getListChucVuByMaNV(maNhanVien);
        }

        public static ChucVu[] getListChucVuKhongDamNhiemByMaNV(int maNhanVien)
        {

            ChucVuDAOWSSoapClient ws = new ChucVuDAOWSSoapClient();
            return ws.getListChucVuKhongDamNhiemByMaNV(maNhanVien);
        }

        public static bool themNhomNguoiDung(NhomNguoiDung nhomND)
        {
            PhanQuyenDAOWSSoapClient ws = new PhanQuyenDAOWSSoapClient();
            return ws.themNhomNguoiDung(nhomND);
        }

        public static bool xoaNhomNguoiDung(NhomNguoiDung nhomND)
        {
            PhanQuyenDAOWSSoapClient ws = new PhanQuyenDAOWSSoapClient();
            return ws.xoaNhomNguoiDung(nhomND);
        }
        
        public static bool kiemtraNhanVien_TonTai_TenDangNhap(string tenDangNhap)
        {
            NhanVienDAOWSSoapClient ws = new NhanVienDAOWSSoapClient();
            return ws.kiemtraNhanVien_TonTai_TenDangNhap(tenDangNhap);
        }


        public static bool suaNhanVien(NhanVien nv)
        {
            NhanVienDAOWSSoapClient ws = new NhanVienDAOWSSoapClient();
            return ws.suaNhanVien(nv);
        }

        
    }
}
